
class Avatar(object):
    __slots__ = (
#        "name",
#        "context",
#        "armature",
#        "arm_data",
#        "bones",
#        "root_bones",
        )

    def __init__(self):#, armature, adj_mat):
        #self.armature = armature
        #self.name = armature.name
        #self.arm_data = armature.data
        #self.bones = {}
        #self.root_bones = []

        #for bone in self.arm_data.bones:
        #    if (not bone.name.startswith("IK_")):
        #        from ossl._types.Bone import Bone
        #        self.bones[bone.name] = Bone(self, bone.name, adj_mat)

        #for bone in self.bones.values():
        #    bone.adjust_hierarchy_up(self)

        #for bone in self.bones.values():
        #    if bone.parent == None:
        #        self.root_bones.append(bone)

        #for bone in self.root_bones:
        #    bone.adjust_hierarchy_down(self)
        pass

############## MenuFolder ###############

import bpy, ossl.menu as menu

class OSSL_MT_Avatar(menu.MenuFolder):
    bl_label = "OSSL Menu Avatar"
    bl_idname = "OSSL_MT_Avatar"

def OSSL_menu_Avatar(self, comtext):
    self.layout.menu("OSSL_MT_Avatar", text="Avatar", icon="OUTLINER_OB_ARMATURE")

import ossl.util as util

def register():
    print("registering: OSSL Type Avatar")
    bpy.utils.register_class(OSSL_MT_Avatar)
    bpy.types.TOPBAR_MT_OSSL.append(OSSL_menu_Avatar)
    util.imports("ossl._types.Avatar", "generate")
    print("registered: OSSL Type Avatar")

def unregister():
    print("unregistering: OSSL Type Avatar")
    util.release("ossl._types.Avatar", "generate")
    bpy.types.TOPBAR_MT_OSSL.remove(OSSL_menu_Avatar)
    bpy.utils.unregister_class(OSSL_MT_Avatar)
    print("unregistered: OSSL Type Avatar")

if __name__ == "__main__":
    util.reset_addon()
